import request from "@/utils/request";

// 获取月卡列表
// export function reqGetCardListAPI(params){
//     return request({
//         url:"/parking/card/list",
//         method:"get",
//         params
//     })
// }

// 获取月卡列表 params参数必须加{} 否则参数不会传递过来
export const reqGetCardListAPI = (params) =>
  request.get("/parking/card/list", { params });

// 添加月卡
export const reqPostCardAPI = (data) => request.post("/parking/card", data);

/**
 * @export
 * @param {string} id
 * @return {Promise}
 */
// 获取月卡详情
export const reqGetDetailAPI = (id) =>
  request.get(`/parking/card/detail/${id}`);

// 修改月卡详情
export const reqPutCardAPI = (data) => request.put("/parking/card/edit", data);

// 删除月卡
export const reqDelCardAPI = (id) => request.delete(`/parking/card/${id}`);
